qui(function(require, exports, module) {
	PreSet.Util = $.extend(true, {}, Ancestor.Util, {
			formatter: {
				score : function(v,r)
				{
					var score = parseFloat(r.score,10);

					if(!isNaN(score) && score!==0){
						return score;
					}
					else{
						return "/";
					}
				},
				avgScore : function(v,r)
				{
					var score = parseFloat(r.avg_score,10);

					if(!isNaN(score) && score!==0){
						return score;
					}
					else{
						return "/";
					}
				},
				repeatInfo:function(v,r)
				{
					var str = "";
					for(var i in r.repeat_info)
					{
						str += PreSet.Config.REPEAT_INFO[r.repeat_info[i]-1]+',';
					}

					return str.substr(0,str.length-1);
				},
				scale:function(v,r)
				{
					var str = "";
					if(r.scale===""){
						str = PreSet.Config.SCALE[0];
					}
					else if(r.scale=="16x9"){
						str = PreSet.Config.SCALE[1];
					}
					else if(r.scale=="4x3"){
						str = PreSet.Config.SCALE[2];
					}
					return str;
				},
				priority:function(v,r)
				{
					return PreSet.Config.PRIORITY[r.priority];
				},
				videoHead : function(v,r)
				{   if(r.headImg!="none" && r.headImg!==undefined){
						return '<a target="_blank" href="http://lego.iqiyi.com/live2VOD/preSet/advertisementLibrary?type=headimage&channel_name='+r.ablum_name+'&channel_id='+r.channel_id+'&ablum_id='+r.ablum_id+'"><img src="'+r.headImg+'" /></a>';
					}
					else
					{
						return "无";
					}
				},
				videoTail : function(v,r)
				{
					if(r.tailImg!="none" && r.tailImg!==undefined){
						return '<a target="_blank" href="http://lego.iqiyi.com/live2VOD/preSet/advertisementLibrary?type=tailimage&channel_name='+r.ablum_name+'&channel_id='+r.channel_id+'&ablum_id='+r.ablum_id+'"><img src="'+r.tailImg+'" /></a>';
					}
					else
					{
						return "无";
					}
				},
				adLibary : function(v,r)
				{
					r.adsImageNumber = parseInt(r.adsImageNumber,10);
					if(r.adsImageNumber !==0 && !isNaN(r.adsImageNumber))
					{
						return '<a target="_blank" href="http://lego.iqiyi.com/live2VOD/preSet/advertisementLibrary?type=adsimage&channel_name='+r.ablum_name+'&channel_id='+r.channel_id+'&ablum_id='+r.ablum_id+'">'+r.adsImageNumber+'</a>';
					}
					else
					{
						return '无';
					}
				},
				operate:function(v,r){
					return "<a href='/epg/live2VOD_preset_edit.html?modify=edit&channel_id="
					+r.channel_id+"&channel_name="+Com.url.getQueryValue("channel_name",location.href)
					+"&album_id="+r.ablum_id+"&album_name="+r.ablum_name+"&scale="+r.scale+"&repeat_info="+r.repeat_info
					+"&start_time="+r.start_time+"&stop_time="+r.stop_time+"&priority="+r.priority
					+"' target='_blank'>修改</a> | <a href='javascript:;' title='删除' onclick='PreSet.Action.getPreSetGrid().del("
					+ r.channel_id +","+r.ablum_id+");'>删除</a>";
				}
			},
			preSetDel : function(options) {

			}
		});
});